package com.heima.apis.wemedia;


import com.heima.model.admin.dtos.NewsAuthDto;
import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmChannelDto;
import com.heima.model.wemedia.dtos.WmSensitive;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "leadnews-wemedia")
public interface IWemediaClient {


    @PostMapping("/api/v1/wmsensitive/list")
    PageResponseResult list(@RequestBody SensitiveDto dto);

    @PostMapping("/api/v1/wmsensitive/save")
    ResponseResult save(@RequestBody WmSensitive wmSensitive);

    @DeleteMapping("/api/v1/wmsensitive/del/{id}")
    ResponseResult delete(@PathVariable Integer id);

    @PostMapping("/api/v1/wmsensitive/update")
    ResponseResult update(@RequestBody WmSensitive wmSensitive);

    @PostMapping("/api/v1/wmnews/list_vo")
    PageResponseResult listVO(@RequestBody NewsAuthDto dto);

    @GetMapping("/api/v1/wmnews/one_vo/{id}")
    ResponseResult getOneVO(@PathVariable Integer id);

    @PostMapping("/api/v1/wmnews/authFail")
    ResponseResult authFail(@RequestBody NewsAuthDto dto);

    @PostMapping("/api/v1/wmnews/authPass")
    ResponseResult authPass(@RequestBody NewsAuthDto dto);

    @PostMapping("/api/v1/wmuser/saveAuth")
    void saveAuth(@RequestBody WmUser wmUser);

    /**
     * 查找全部频道
     * @param wmChannelDto(page,size,name)
     * @return list列表
     */
    @PostMapping("/api/v1/wmchannel/list")
    PageResponseResult list(@RequestBody WmChannelDto wmChannelDto);

    /**
     * 保存频道
     * @param wmChannel
     * @return
     */
    @PostMapping("/saveChannel")
    public ResponseResult saveChannel(@RequestBody WmChannel wmChannel);

    /**
     * 删除频道
     * @param id
     * @return
     */
    @GetMapping("/deleteChannel/{id}")
    public ResponseResult deleteChannelByid(@PathVariable Integer id);

    /**
     * 更新频道
     * @param wmChannel
     * @return
     */
    @PostMapping("/updateChannel")
    public ResponseResult updateChannelByid(@RequestBody WmChannel wmChannel);
}
